﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="StackOverflowSample.MainWindow"
        Title="Search 1000 questions posted on Meta StackOverflow" Height="417.5" Width="633">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" MinHeight="27.498"/>
        </Grid.RowDefinitions>
        <Border Margin="0" Padding="4" CornerRadius="3" BorderBrush="#FF818181" BorderThickness="1" Background="#FFFCFFD0">
    		<Grid>
    			<Grid.RowDefinitions>
    				<RowDefinition Height="0.435*"/>
    				<RowDefinition Height="0.565*"/>
    			</Grid.RowDefinitions>
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="*" />
    				<ColumnDefinition Width="Auto" />
    			</Grid.ColumnDefinitions>
    			<TextBox HorizontalAlignment="Stretch" x:Name="searchText" VerticalAlignment="Top"  />
    			<Button Content="Search" Grid.Column="1" Height="23" HorizontalAlignment="Stretch" x:Name="searchButton" VerticalAlignment="Stretch" Width="75" IsDefault="True" />
    			<TextBlock HorizontalAlignment="Stretch" x:Name="queryTextEquivalent" Text="Textual representations of queries appear here..." Grid.ColumnSpan="2" Margin="0,6,0,1.04" Grid.Row="1" />
    		</Grid>
    	</Border>
        <Border Grid.Row="1" BorderBrush="#FF818181" BorderThickness="1" Margin="0,4,0,0" CornerRadius="5" Padding="3,0,3,3">
        	<Border.Background>
        		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			<GradientStop Color="#FFB1B1F7" Offset="0"/>
        			<GradientStop Color="#FFD6D6FF" Offset="0.047"/>
        		</LinearGradientBrush>
        	</Border.Background>
        	<Grid>
        		<Grid.RowDefinitions>
        			<RowDefinition Height="Auto"/>
        			<RowDefinition/>
        			<RowDefinition Height="Auto" MinHeight="22.058"/>
        		</Grid.RowDefinitions>
        		<Grid.ColumnDefinitions>
        			<ColumnDefinition Width="0.498*"/>
        			<ColumnDefinition Width="0.502*"/>
        		</Grid.ColumnDefinitions>
        		<ListBox x:Name="results" VerticalAlignment="Stretch" Margin="0,0,-0.833,0" Grid.Row="1">
        			<ListBox.ItemTemplate>
        				<DataTemplate>
        					<TextBlock Text="{Binding Title}" />
        				</DataTemplate>
        			</ListBox.ItemTemplate>
        		</ListBox>
        		<WebBrowser x:Name="bodyViewer" Grid.Column="1" Margin="0.833,0,0,0" Grid.Row="1" />
        		<TextBlock TextWrapping="Wrap" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="Search Results" FontWeight="Bold" FontSize="16" Margin="0,0,0,2" d:LayoutOverrides="GridBox"/>
        		<TextBlock Grid.ColumnSpan="2" Grid.Row="2" TextWrapping="Wrap" VerticalAlignment="Center" Foreground="#FF00006A" FontWeight="Bold" x:Name="stats"/>
        	</Grid>
        </Border>
        <TextBlock Grid.Row="2" TextWrapping="Wrap" VerticalAlignment="Center" Margin="10,0,0,0" Foreground="#FF292929"><Run Language="en-gb" Text="This sample searches the body text of 1000 questions downloaded from http://data.stackexchange.com/. All rights to the content belong to StackOverflow and are only used in this application as sample text to search on. "/></TextBlock>
    </Grid>
</Window>
